import request from '@/utils/request'

// 获取知识库列表
export function listKnowledge(query) {
  return request({
    url: '/customer/knowledge/base/list',
    method: 'get',
    params: query
  })
}
// 获取知识库统计列表
export function listStatistics(query) {
  return request({
    url: '/customer/knowledge/base/statistics',
    method: 'get',
    params: query
  })
}
//删除知识库
export function delKnowledge(ids) {
  return request({
    url: '/customer/knowledge/base/delete/' + ids,
    method: 'post'
  })
}
// 保存知识库
export function setKnowledge(data) {
  return request({
    url: '/customer/knowledge/base/save',
    method: 'post',
    data
  })
}
// 数据导入
export function importKnowledge(data) {
  return request({
    url: '/customer/knowledge/base/import',
    method: 'post',
    data
  })
}
//通过id获取详情
export function getKnowledgeDetail(id) {
  return request({
    url: '/customer/knowledge/base/get/' + id,
    method: 'get'
  })
}
